﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GenericHostDemo.Interface
{
    /// <summary>
    /// 生命周期接口
    /// </summary>
    public interface IHostedService
    {
        Task StartAsync();
        Task StopAsync();
    }

    /// <summary>
    /// 主机接口
    /// </summary>
    public interface IHost : IDisposable
    {
        IServiceProvider Services { get; }
        Task StartAsync();
        Task StopAsync();
    }
}
